#ifndef ITEMS_ITEM_HH
#define ITEMS_ITEM_HH

#include <string>

/**
 * @class Item
 * @brief Represents an interactable item in the game.
 *
 * Items may be collectable, usable, or trigger special interactions or events.
 */
class Item
{
private:
    std::string name;
    std::string description;
    std::string type;

    int attackBonus;
    int defenseBonus;
    unsigned healthBonus;
    int maxHealthBonus;

    bool consumable; // Can the item be used up?
    bool passive;    // Does the item provide effects just by being held?

public:
    Item(std::string name,
         std::string description,
         std::string type,
         int atkBonus = 0,
         int defBonus = 0,
         unsigned hpBonus = 0,
         int maxHpBonus = 0,
         bool isConsumable = false,
         bool isPassive = false);

    // --- 析构函数声明 ---
    virtual ~Item() = default;

    // --- Getters ---
    const std::string &getName() const { return name; }
    const std::string &getDescription() const { return description; }
    const std::string &getType() const { return type; }

    int getAttackBonus() const { return attackBonus; }
    int getDefenseBonus() const { return defenseBonus; }
    unsigned getHealthBonus() const { return healthBonus; }
    int getMaxHealthBonus() const { return maxHealthBonus; }

    bool isConsumable() const { return consumable; }
    bool isPassive() const { return passive; }
};

#endif
